﻿using Microsoft.AspNetCore.Mvc;
using Configuration.ServerApi.Param;
using System.Threading.Tasks;

namespace Configuration.ServerApi.Service
{
    /// <summary>
    /// IMenuService
    /// </summary>
    public interface IMenuService
    {
        /// <summary>
        /// 获取菜单列表
        /// </summary>
        /// <param name="param">搜索条件</param>
        /// <returns>JSON结果集</returns>
        public Task<JsonResult> MenuList(SearchModel param);

        /// <summary>
        /// 获取菜单详情
        /// </summary>
        /// <param name="param">搜索条件</param>
        /// <returns>JSON结果集</returns>
        public Task<JsonResult> MenuDetail(SearchModel param);

        /// <summary>
        /// 提交菜单信息
        /// </summary>
        /// <param name="param">更新参数集</param>
        /// <returns>JSON结果集</returns>
        public Task<JsonResult> SubmitMenu(UpdateModel param);

        /// <summary>
        /// 批量删除菜单信息
        /// </summary>
        /// <param name="param">更新参数集</param>
        /// <returns>JSON结果集</returns>
        public Task<JsonResult> DelMenu(UpdateModel param);

        /// <summary>
        /// 获取树形菜单列表
        /// </summary>
        /// <returns>JSON结果集</returns>
        public Task<JsonResult> TreeMenuList();

        /// <summary>
        /// 获取全部树形菜单节点列表
        /// </summary>
        /// <returns>JSON结果集</returns>
        public Task<JsonResult> AllTreeMenuNodeList();

        /// <summary>
        /// 获取登录用户拥有的权限菜单列表
        /// </summary>
        /// <returns>JSON结果集</returns>
        public Task<JsonResult> UserRoleMenuList();

        /// <summary>
        /// 获取登录用户拥有的树形权限菜单列表
        /// </summary>
        /// <returns>JSON结果集</returns>
        public Task<JsonResult> UserRoleTreeMenuList();

        /// <summary>
        /// 获取指定角色拥有的权限菜单列表
        /// </summary>
        /// <param name="param">搜索条件</param>
        /// <returns>JSON结果集</returns>
        public Task<JsonResult> UserRoleMenuListById(SearchModel param);

        /// <summary>
        /// 提交角色菜单授权信息
        /// </summary>
        /// <param name="param">更新参数集</param>
        /// <returns>JSON结果集</returns>
        public Task<JsonResult> SubmitUserRoleMenu(UpdateModel param);

    }
}
